This is a deadlock bug.
The following is an example of deadlock thread dump:
"Thread-1": waiting to lock monitor 0x0000000005edd908 (object 0x000000003ff99468,
a java.util.Hashtable), which is held by "Thread-0"
"Thread-0": waiting to lock monitor 0x0000000005edd9b0 (object 0x000000003ff995d8,
a java.util.Hashtable), which is held by "Thread-1"
Java stack information for the threads listed above:
===================================================
"Thread-1":
at java.util.Hashtable.size(Hashtable.java:206)
- waiting to lock <0x000000003ff99468> (a java.util.Hashtable)
at java.util.Hashtable.equals(Hashtable.java:742)
- locked <0x000000003ff995d8> (a java.util.Hashtable)
at Test6582568$2.run(Test6582568.java:45)
"Thread-0":
at java.util.Hashtable.get(Hashtable.java:333)
- waiting to lock <0x000000003ff995d8> (a java.util.Hashtable)
at java.util.Hashtable.equals(Hashtable.java:755)
- locked <0x000000003ff99468> (a java.util.Hashtable)
at Test6582568$1.run(Test6582568.java:35)
More details about this bug are at
JDK-6582568 JIRA page.
This bug is reproduced under JDK 1.6.0.
It has not been fixed.
Execute the following scripts to run the test to reproduce the bug (assume the location of the jdk6 test project is jdk_test_home).
Linux:
${jdk_test_home}/scripts/6582568.sh [--monitoroff] [--javaloc path]
Windows:
%jdk_test_home%\scripts\6582568.bat [--monitoroff] [--javaloc path]
Example:
Use monitor to report and terminate the program when deadlock happens:
${jdk_test_home}/scripts/6582568.sh
Turn off monitor:
${jdk_test_home}/scripts/6582568.sh
--monitoroff
| Option | Function |
| --monitoroff, -mo | Turn off to stop reporting bug messages and ending program
when the test runs into the expected concurrency bug which is
a deadlock. User has to terminate the program manually when this option is set. |
| --javaloc | The location of JDK that is eligible to reproduce the bug, if your java environment is not eligible.
In this case, it's JDK 1.6.0. It should be the absolute path to the JDK's java starter and ended with "/". For example: ~/jdk/home/jdk1.6.0/bin/ |